home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / dev / c / minigl.lha / MiniGL / doc / MiniGL_vertexarrays.doc < prev    next >
Encoding:
Text File  |  2002-07-01  |  2.6 KB  |  76 lines

  1. 30-06-02 by Christian Michael
  2.  
  3.  
  4. Notes about vertexarray-implementation in MiniGL:
  5.  
  6. - No support for GL_DOUBLE as type for glVertexPointer
  7. - No support for glNormalPointer
  8. - No support for glInterleavedArrays yet
  9. - No multitexture support yet.
  10.  
  11. - Indexing supported: (glBegin, glArrayElement.., glEnd),
  12.   NOTE: NOT OpenGL conforming since glArrayElement cannot be
  13.   mixed with other commands between glBegin and glEnd
  14.  
  15. - glDrawArrays, glDrawElements supported
  16.  
  17. - IMPORTANT: The vertexbuffer MUST have a size that is at
  18.   least twice as large as the number of last element in
  19.   the applications vertex-data-arrays.
  20.   glDrawElements currently has to assume some safe place for
  21.   clipping to avoid index-scans.
  22.  
  23. - Currently supported primitives: (all drawing methods)
  24.   GL_TRIANGLES
  25.   GL_TRIANGLE_FAN
  26.   GL_TRIANGLE_STRIP
  27.   GL_POLYGON
  28.   MGL_FLATFAN
  29.  
  30. - GL_EXT_compiled_vertex_array is supported:
  31.   (glLockArrays .... glUnlockArrays) 
  32.   Note that the texcoordpointer and colorpointer are never
  33.   considered locked. The official OpenGL specifiction is
  34.   very unclear as to what should be allowed inside a lock.
  35.   Anyways, with MiniGL, texcoords and colors can be updated
  36.   within the locked range without adverse effects between
  37.   drawing calls, which can be any mixture of the following:
  38.     glDrawElements(*),
  39.     glDrawArrays(*),
  40.     glBegin(*) glArrayElement(*) glEnd()
  41.  
  42.  
  43.  
  44. - Special MiniGL-speciffic features:
  45.  
  46.   The colorformats MGL_UBYTE_ARGB and MGL_UBYTE_BGRA are
  47.   supported.
  48.  
  49.   Integer vertexcoords are supported with fixpoint pipeline.
  50.   Use GL_INT as type in glVertexPointer calls.
  51.   Note that the range for integer vertexcoords is narrow
  52.   (+-256 might be the limit)
  53.  
  54.   Pipeline for vertexarrays can be toggled with glEnable,
  55.   glDisable and the parameter MGL_ARRAY_TRANSFORMATIONS.
  56.   This is useful for 2D, because the pipeline wraps directly
  57.   to Warp3D as opposed to the MGL_FLATFAN.
  58.   The default setting for the pipeline is enabled.
  59.   With the pipeline disabled, the number of texcoord-
  60.   elements in an array MUST be 4, where the 4th element
  61.   contains the w coordinate used for perspective correction
  62.   by Warp3D.
  63.  
  64. - Performance tips:
  65.   If a given polygon-mesh contains a lot of shared verts,
  66.   then use glLockArrays(first, count), glDrawElements(*) ...
  67.   glUnlockArrays() to avoid excessive transformations.
  68.   If a vertex can have more than 1 set of texcoords, then
  69.   optimize the array for identical verts without caring
  70.   about this. Texcoords can be overwritten on the fly within
  71.   glLockArrays/glUnlockArrays construct.
  72.  
  73.   As a general rule, always use glDrawElements within
  74.   glLockArrays/glUnlockArrays since the MiniGL pipeline is
  75.   optimized for this extension.
  76.